package com.booksystem.campuslibrarymanagementsystem.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.booksystem.campuslibrarymanagementsystem.commen.request.userquest.Personalrequest.Favorites;
import com.booksystem.campuslibrarymanagementsystem.commen.request.userquest.Personalrequest.Favoritesdvsd;
import com.booksystem.campuslibrarymanagementsystem.entity.BooksTable;
import com.booksystem.campuslibrarymanagementsystem.entity.FavoritesTable;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FavoritesTableService extends IService<FavoritesTable> {
    //添加收藏
    int saved(Favoritesdvsd ff);
    //判断是否重复收藏
    FavoritesTable existsByAccountAndBookid(String account,int bookid);
    List<FavoritesTable> selectfavoritesList(String title, String author, String category);

    List<FavoritesTable> selectByaccount(@Param("account") String account);

    int deleteByAccountAndBookid(@Param("account") String account, @Param("favoriteid") int favoriteid);

}
